﻿using System;
namespace EduardoMessias.DevTools
{
    public abstract class Singleton<T> where T: class, new()
    {
        private static T _instance;

        public static T GetInstance()
        {
            if (_instance == null)
                _instance = Activator.CreateInstance<T>();

            return _instance;
        }
    }
}
